<?php

namespace app\common\model;

use think\Model;

class GuessModel extends Model
{
    protected $connection = ['database' => 'guess'];

    public function question()
    {
        return $this->hasOne(QuestionModel::class, 'id', 'q_id');
    }

    public function user()
    {
        return $this->hasOne(UserModel::class, 'id', 'anchor_id');
    }

    public function live()
    {
        return $this->hasOne(LiveModel::class, 'id', 'live_id');
    }
}